{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/components/ContactItem/index.tsx\";\nimport React from 'react';\nimport classNames from \"classnames\";\nimport { Button, DropDownMenu, UserItem } from \"../index\";\nimport './ContactItem.scss';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nconst ContactItem = props => {\n  if (props.addRequest) {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-add-requests\"),\n      children: [/*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-container\",\n        children: props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.fromUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 14,\n          columnNumber: 29\n        }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.toUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 16,\n          columnNumber: 25\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 12,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(DropDownMenu, {\n        children: /*#__PURE__*/_jsxDEV(_Fragment, {\n          children: [/*#__PURE__*/_jsxDEV(Button, {\n            text: 'Принять',\n            callback: () => console.log(1343),\n            customClassName: \"\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 22,\n            columnNumber: 29\n          }, this), /*#__PURE__*/_jsxDEV(Button, {\n            text: 'Отозвать',\n            callback: () => console.log(1343),\n            customClassName: \"\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 23,\n            columnNumber: 29\n          }, this)]\n        }, void 0, true)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 19,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 11,\n      columnNumber: 13\n    }, this);\n  } else if (props.sentRequest) {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-sent-requests\"),\n      children: [/*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-container\",\n        children: props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.fromUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 34,\n          columnNumber: 29\n        }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.toUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 36,\n          columnNumber: 25\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 32,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(DropDownMenu, {\n        children: /*#__PURE__*/_jsxDEV(_Fragment, {\n          children: /*#__PURE__*/_jsxDEV(Button, {\n            text: 'Отозвать',\n            callback: () => console.log(1343),\n            customClassName: \"\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 42,\n            columnNumber: 29\n          }, this)\n        }, void 0, false)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 39,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 31,\n      columnNumber: 13\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-all-accepted\"),\n      children: [/*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-container\",\n        children: props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.fromUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 53,\n          columnNumber: 29\n        }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.toUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 55,\n          columnNumber: 25\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 51,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(DropDownMenu, {\n        children: /*#__PURE__*/_jsxDEV(_Fragment, {\n          children: [/*#__PURE__*/_jsxDEV(Button, {\n            text: 'Отозвать',\n            callback: () => console.log(1343),\n            customClassName: \"\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 61,\n            columnNumber: 29\n          }, this), /*#__PURE__*/_jsxDEV(Button, {\n            text: 'Удалить',\n            callback: () => console.log(1343),\n            customClassName: \"\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 62,\n            columnNumber: 29\n          }, this)]\n        }, void 0, true)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 58,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 50,\n      columnNumber: 13\n    }, this);\n  }\n};\n_c = ContactItem;\nexport default ContactItem;\nvar _c;\n$RefreshReg$(_c, \"ContactItem\");","map":{"version":3,"names":["React","classNames","Button","DropDownMenu","UserItem","ContactItem","props","addRequest","currentUser","id","contact","toUser","fromUser","console","log","sentRequest"],"sources":["/data/messenger.client/src/components/ContactItem/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from \"classnames\";\nimport {ContactItemProps} from \"../../models/props/ContactItemProps\";\nimport {Button, DropDownMenu, UserItem} from \"../index\";\nimport './ContactItem.scss';\n\nconst ContactItem: React.FC<ContactItemProps> = (props) => {\n\n    if (props.addRequest) {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-add-requests\")}>\n                <div className=\"contacts__item-container\">\n                    {(props.currentUser.id === props.contact.toUser.id &&\n                            <UserItem profile={props.contact.fromUser} />\n                        ) ||\n                        <UserItem profile={props.contact.toUser} />\n                    }\n                </div>\n                <DropDownMenu\n                    children={\n                        <>\n                            <Button text={'Принять'} callback={() => (console.log(1343))} customClassName='' />\n                            <Button text={'Отозвать'} callback={() => (console.log(1343))} customClassName='' />\n                        </>\n                    }\n                />\n            </div>\n        );\n    } else if (props.sentRequest) {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-sent-requests\")}>\n                <div className=\"contacts__item-container\">\n                    {(props.currentUser.id === props.contact.toUser.id &&\n                            <UserItem profile={props.contact.fromUser} />\n                        ) ||\n                        <UserItem profile={props.contact.toUser} />\n                    }\n                </div>\n                <DropDownMenu\n                    children={\n                        <>\n                            <Button text={'Отозвать'} callback={() => (console.log(1343))} customClassName='' />\n                        </>\n                    }\n                />\n            </div>\n        );\n    } else {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-all-accepted\")}>\n                <div className=\"contacts__item-container\">\n                    {(props.currentUser.id === props.contact.toUser.id &&\n                            <UserItem profile={props.contact.fromUser} />\n                        ) ||\n                        <UserItem profile={props.contact.toUser} />\n                    }\n                </div>\n                <DropDownMenu\n                    children={\n                        <>\n                            <Button text={'Отозвать'} callback={() => (console.log(1343))} customClassName='' />\n                            <Button text={'Удалить'} callback={() => (console.log(1343))} customClassName='' />\n                        </>\n                    }\n                />\n            </div>\n        );\n    }\n}\n\nexport default ContactItem;"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAAQC,MAAM,EAAEC,YAAY,EAAEC,QAAQ,QAAO,UAAU;AACvD,OAAO,oBAAoB;AAAC;AAAA;AAE5B,MAAMC,WAAuC,GAAIC,KAAK,IAAK;EAEvD,IAAIA,KAAK,CAACC,UAAU,EAAE;IAClB,oBACI;MAAK,SAAS,EAAEN,UAAU,CAAC,gBAAgB,EAAE,6BAA6B,CAAE;MAAA,wBACxE;QAAK,SAAS,EAAC,0BAA0B;QAAA,UACnCK,KAAK,CAACE,WAAW,CAACC,EAAE,KAAKH,KAAK,CAACI,OAAO,CAACC,MAAM,CAACF,EAAE,iBAC1C,QAAC,QAAQ;UAAC,OAAO,EAAEH,KAAK,CAAC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